//
//  RecPKModel.m
//  WuLi
//
//  Created by Gollum on 16/09/09
//  Copyright (c) Gollum. All rights reserved.
//

#import "RecPKModel.h"
#import "RecPKData.h"

@implementation RecPKModel

+ (NSDictionary *)objectClassInArray{
    return @{@"data" : [RecPKData class]};
}
- (void)setValue:(id)value forKey:(NSString *)key{
    
    [super setValue:value forKey:key];
    NSMutableArray *myData = [NSMutableArray array];
    if ([key isEqualToString:@"data"]) {
        NSArray *valueArray = value;
        for (NSDictionary * dataDic in valueArray) {
            RecPKData *recPKData = [RecPKData modelWithDic:dataDic];
            [myData addObject:recPKData];
        }
        _data = myData;
    }
}
@end
